 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page session="true" import="servlets.*" %>
<%@ page session="true" import="classes.*" %>
<%@ page session="true" import="beans.*" %>
<%@ page session="true" import="java.sql.ResultSet" %>
<%  	session = request.getSession(true); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@page import="java.util.List"%><html class="js" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sistema de Noticias</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<%@ include file="inc_head.jsp" %>  


</head>
<body>  
<div id="page"> 
  <div id="wrapper"> 
    <div id="header"> <a href="?pg=index"><img src="index_arquivos/logo.png" alt="" id="logo"></a> 
                 <h2><a href="Home"></a></h2> 
      <div class="slogan" style="color:#ffffff"></div> 
    </div> 
    <div id="left-col"> 
    
   <%@ include file="inc_menutop.jsp" %>   

      
      <!-- /nav -->  
      <div id="content"> 
        <div class="dbx-box" id="block-block"> 
          <div> 
            <% if (request.getParameter("msg_sucesso") != null) { %> 
            <div id="msg_sucesso"><% out.print(request.getParameter("msg_sucesso")); %></div>
            <% } %>
              <% if (request.getParameter("msg_erro") != null) { %> 
            <div id="msg_erro"><% out.print(request.getParameter("msg_erro")); %></div>
            <% } %> 
            
            <h1>Autores</h1>

  
  
				<%  	List<Autor> autores  = (List<Autor>)session.getValue("autores"); %> 
				   
				<% for(int i = 0; i < autores.size(); i++) {
					Autor autor = (Autor)autores.get(i); 
				%>  
            
                    <ul>
                    
                        <li>   
                        	<strong><%  out.print(autor.getNome()); %></strong>
 	                      	<a href="AutoresEdit?id=<%  out.print(autor.getId()); %>"><img src="css/itheme/images/mini-edit.gif" border="0"></a>   
                        	<a href="AutoresDelete?id=<%  out.print(autor.getId()); %>"><img src="css/itheme/images/mini-trash.gif" border="0"></a>
                         	
                        	<br />
                        	Login: <%  out.print(autor.getLogin()); %><br />
                        	Senha: <%  out.print(autor.getSenha()); %>     
                        </li>
                   </ul> 
                    
                <%    
				}
				%>   

     
     <br /><br />
     



			<h2>Adicionar Autor</h2>	
			
			  <form action="AutoresAdd" method="post">	 
				                  
              <p>
              <span class="titulo_01">
              <strong>Nome</strong>:<br />
              <input type="text" name="nome" id="nome" style="width:280px"  />
              <br />   
              
               <strong>Login</strong>:<br />
              <input type="text" name="login" id="login" style="width:280px"  />
              <br />

              <strong>Senha</strong>:<br />
              <input type="password" name="senha" id="senha" style="width:280px"  />
              <br />
              <p>
	              <span class="botao_comum" style="float:left">
	            	  <input type="submit" value="Enviar" />
	              </span>           
              </p>
				
				</form>



		</div> 
        </div> 
      </div> 
      <div id="footer">&nbsp;</div> 
    </div> 
    
    
   <%@ include file="inc_menu.jsp" %>  



    <hr class="hidden"> 
  </div> 
</div> 
</body>
</html>
